package com.leetcode.algorithm.y22.m09.w3;

/**
 * 836. 矩形重叠
 * 
 * https://leetcode.cn/problems/rectangle-overlap/
 * 
 * @author jie.deng
 *
 */
class Question0836Solution01 {
	
	public boolean isRectangleOverlap(int[] rec1, int[] rec2) {
		if (rec1[0] >= rec2[2] || rec1[2] <= rec2[0] || rec1[1] >= rec2[3] || rec1[3] <= rec2[1]) {
			// 上、下、左、右
			return false;
		}
		return true;
	}
    
}